<?php
require_once 'Service/Resource/PresentationInterface.php';
require_once 'Service/Presentation/Xml/Node.php';

class Service_Presentation_Xml_Document
    extends Service_Presentation_Xml_Node
    implements Service_Resource_PresentationInterface
{
    const DEFAULT_NODE_NAME = 'root';

    public function serialize()
    {
        return $this->__toString();
    }

    public function __toString()
    {
        $content = parent::__toString();

        return "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n{$content}";
    }
}
